package com.job.Gai_Yian.Homework0718;

import java.util.Random;
import java.util.Scanner;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-19 10:56:49
 */
public class Ticket {
    public static void main(String[] args) {
        int[] TicketNumbers=new int[7];
        Scanner sc=new Scanner(System.in);
        for (int i=1;i<=5;i++){                           //输入5次号码
            System.out.println("请输入第"+i+"组号码：");
            int[] num=new int[7];
            for (int j=0;j<=6;j++){
                num[j]=sc.nextInt();
            }
            int n=0;     //重复的号码的个数
            for (int j=0;j<=6;j++){
            for (int k=0;k<=6;k++){
                if (num[j]==TicketNumbers[k]){
                    n++;
                }
            }
        }
            switch (n){
                case 1:
                    System.out.println("恭喜你中了六等奖！！！");
                    break;
                case 2:
                    System.out.println("恭喜你中了五等奖！！！");
                    break;
                case 3:
                    System.out.println("恭喜你中了四等奖！！！");
                    break;
                case 4:
                    System.out.println("恭喜你中了三等奖！！！");
                    break;
                case 5:
                    System.out.println("恭喜你中了二等级！！！");
                    break;
                case 6:
                    System.out.println("恭喜你中了一等奖！！！");
                    break;
                case 7:
                    System.out.println("恭喜你中了特等奖！！！");
                    break;
                default:
                    System.out.println("很遗憾，你没有中奖。。。。。。");
                    break;
            }
        }
    }
    private static void CreatTicketNumber(int[] TicketNumbers){
        Random ran=new Random();
        int number=ran.nextInt(33)+1;
        for (int i = 0; i <=6 ; i++) {
            TicketNumbers[i]=number;
        }
    }
}
